css: Fix shadow value equal
authorMatthias Clasen <mclasen@redhat.com>
Wed, 3 Feb 2021 16:21:23 +0000 (11:21 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 4 Feb 2021 03:10:13 +0000 (22:10 -0500)
This function was not doing the right thing.

Once we are doing the right thing and not compare
shadows as unequal, some reftests that inhibit
snapshots for a few frames now hang forever, since
we are no more redrawing unnecessarily. Fix that
with an explicit queue_draw.

gtk/gtkcssshadowvalue.c
testsuite/reftests/frame-inhibitor.c

index 9ad69b918266c0285e21ed629af7b3993c05ff39..126e9af8f2262ab695a3b2ff1a13fb254da92014 100644 (file)
@@ -151,11 +151,11 @@ gtk_css_value_shadow_equal (const GtkCssValue *value1,
       const ShadowValue *shadow2 = &value2->shadows[i];
 
       if (shadow1->inset != shadow2->inset ||
-          _gtk_css_value_equal (shadow1->hoffset, shadow2->hoffset) ||
-          _gtk_css_value_equal (shadow1->voffset, shadow2->voffset) ||
-          _gtk_css_value_equal (shadow1->radius, shadow2->radius) ||
-          _gtk_css_value_equal (shadow1->spread, shadow2->spread) ||
-          _gtk_css_value_equal (shadow1->color, shadow2->color))
+          !_gtk_css_value_equal (shadow1->hoffset, shadow2->hoffset) ||
+          !_gtk_css_value_equal (shadow1->voffset, shadow2->voffset) ||
+          !_gtk_css_value_equal (shadow1->radius, shadow2->radius) ||
+          !_gtk_css_value_equal (shadow1->spread, shadow2->spread) ||
+          !_gtk_css_value_equal (shadow1->color, shadow2->color))
         return FALSE;
     }
 
index 567dc07ae1dca0fde1eb148253c7fa18451920ec..9d699c4224e066f0b7c5d464e6c4f1d842d47cb7 100644 (file)
@@ -30,6 +30,7 @@ tick_callback_for_1_frame (GtkWidget     *widget,
                            gpointer       unused)
 {
   reftest_uninhibit_snapshot ();
+  gtk_widget_queue_draw (widget);
 
   return G_SOURCE_REMOVE;
 }